////////////////////////////////////////////////////////////////////////////////
// Z-Day Project File                                                         //
// -------------------------------------------------------------------------- //
// Filename:   /entities/weapons/weapon_flashlight/shared.lua                 //
// Type:       Shared                                                         //
// Contents:   "Flashlight" SWEP.                                             //
////////////////////////////////////////////////////////////////////////////////

if ( SERVER ) then AddCSLuaFile( "shared.lua" ) end

SWEP.Primary.ClipSize = -1; 
SWEP.Primary.DefaultClip = -1; 
SWEP.Primary.Automatic = false; 
SWEP.Primary.Ammo = "none"; 

SWEP.Secondary.ClipSize = -1;
SWEP.Secondary.DefaultClip = -1; 
SWEP.Secondary.Automatic = false; 
SWEP.Secondary.Ammo = "none";

SWEP.Base						= "weapon_zd_base"

SWEP.ViewModel					= "models/weapons/v_pist_fiveseven.mdl"
SWEP.WorldModel					= "models/weapons/w_pist_fiveseven.mdl"

SWEP.ViewModelFOV				= 75
SWEP.ViewModelFlip				= true
SWEP.IronSightsPos 				= Vector( 4.3, -2, 2.7 )
SWEP.IronSightsAng				= Vector( 0, 0, 0 )

SWEP.Weight						= 5
SWEP.HoldType					= "pistol"
SWEP.GunSmoke					= true
SWEP.ShowIndividualRounds		= false

SWEP.Primary.Sound				= Sound( "Weapon_Glock.Single" )
SWEP.Primary.Recoil				= 1.8
SWEP.Primary.Damage				= 15
SWEP.Primary.NumShots			= 1
SWEP.Primary.Cone				= 0.02
SWEP.Primary.NoCone				= false
SWEP.Primary.Delay				= 0.19
SWEP.Primary.ClipSize			= 16
SWEP.Primary.DefaultClip		= 16
SWEP.Primary.Automatic			= false
SWEP.Primary.Ammo				= "pistol"

SWEP.Secondary.ClipSize			= -1
SWEP.Secondary.DefaultClip		= -1
SWEP.Secondary.Automatic		= false
SWEP.Secondary.Ammo				= "none"

//SWEP.KillString1				= "killed"
//SWEP.KillString2				= "with his...flashlight?"

SWEP.Enabled					= false

SWEP.IsFlashlight				= true

function SWEP:Reload() 
end

function SWEP:Holster( wep )
	if(SERVER) then
	    self.Enabled = false
		self.Owner:Flashlight(false)
		end
	return true
	end
	
function SWEP:PrimaryAttack()
	if (SERVER) then
	    self.Enabled = !self.Enabled
	    self.Owner:Flashlight(self.Enabled) 
    end
end

function SWEP:SecondaryAttack()
end
